// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Application</Project>
// <FileName>GetProductsRequestDto.cs</FileName>
// <CreateTime>2017-04-22 1:37</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-22 1:37" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.ComponentModel.DataAnnotations;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.BangChuang.Areas.DomainDtos;
using Vecen.BangChuang.BangChuang.Areas.Dtos;

namespace Vecen.BangChuang.BangChuang.Products.Dto
{
    /// <summary>
    /// 获得商品列表请求参数
    /// </summary>
    public class GetProductsRequestDto : IPagedAndSortedResultRequest, ICityInputDto
    {
        /// <summary>
        /// 商品类别(必填)
        /// </summary>
        [Required]
        public ProductType ProductType { get; set; }

        /// <summary>
        /// 名称(可选,搜索用)
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 分类ID(可选)
        /// </summary>
        public int? CategoryId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public GetProductsRequestDto()
        {
            Sorting = "Id DESC";
        }

        /// <summary>
        /// 最大返回行数(每页大小,必填)
        /// </summary>
        [Required]
        public int MaxResultCount { get; set; }

        /// <summary>
        /// 跳过多少条
        /// </summary>
        [Required]
        public int SkipCount { get; set; }

        /// <summary>
        /// 排序方式(可选,默认ID倒序)
        /// </summary>
        public string Sorting { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        /// <returns></returns>
        public long? ProvinceId { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        /// <returns></returns>
        public long? CityId { get; set; }

        /// <summary>
        /// 县/区
        /// </summary>
        /// <returns></returns>
        public long? DistrictId { get; set; }
    }
}